package midi;

public class IntervalOperations {
	public enum interval {
		Unison(0),
		MinorSecond(1),
		MajorSecond(2),
		MinorThird(3),
		MajorThird(4),
		PerfectFourth(5),
		AugFourth(6),
		PerfectFifth(7),
		MinorSixth(8),
		MajorSixth(9),
		MinorSeventh(10),
		MajorSeventh(11),
		Octave(12);

		private final int offset;

		interval(int offset){
			this.offset = offset;
		}

		public int offset(){
			return offset;
		}

	}

	public static int raise(int baseNoteNumber, interval interval){
		return baseNoteNumber + interval.offset;
	}
	
	public static int[] raise(int[] baseNoteNumbers, interval interval){
		for (int i = 0; i < baseNoteNumbers.length; i++){
			baseNoteNumbers[i] += interval.offset;
		}
		
		return baseNoteNumbers;
	}



}
